var fs = require("fs")

// 同步读取
var data = fs.readFileSync('level126.json');
var balls = JSON.parse(data)["g"];

balls.sort(function(a, b){
    return (a["p"][1] * 100 + a["p"][0]) - (b["p"][1] * 100 + b["p"][0])
});

for(var i = 0; i < balls.length; ++i)
{
    console.log(JSON.stringify(balls[i]));
}